]> dgit.raspbian.org Git - gnome-shell.git/commit
loginDialog: Catch possible errors when session is opened
authorAlessandro Bono <alessandro.bono369@gmail.com>
Mon, 19 Aug 2024 09:47:45 +0000 (11:47 +0200)
committerAlessandro Bono <alessandro.bono369@gmail.com>
Tue, 20 Aug 2024 10:38:41 +0000 (12:38 +0200)
commitf1223c6852ad5fcf279d5541dbb061e2a5613383
tree86c2a78b3b03fb06bd9b673dc4433249d94eaf4f
parent90707c0045c62af1eb87a20e77bb14dadbf296c9
loginDialog: Catch possible errors when session is opened

Since commit df84854d9073c457d79d7c2e6a5750428c52ff01 the function
_onSessionOpened() is now async. This means that if an error occurs
we get the following warning:
```
gnome-shell[1014]: Unhandled promise rejection. To suppress this
warning, add an error handler to your promise chain with .catch()
or a try-catch block around your await expression. Stack trace of
the failed promise:
_onSessionOpened@resource:///org/gnome/shell/gdm/loginDialog.js:1166:27 @resource:///org/gnome/shell/ui/init.js:21:20
```

Follow the suggestion and add a try-catch block in order to reveal
what the error is. In the catch phase, reset the faded AuthPrompt
otherwise we can't retry with another user.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3448>
js/gdm/loginDialog.js